package com.sc.nft.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.UserEcologyPoints;
import com.sc.nft.entity.UserEcologyPointsWallet;
import com.sc.nft.entity.vo.AdminDaoEcologyPointWalletPageVO;
import com.sc.nft.entity.vo.AdminEcologyPointsUserWalletPageVO;
import com.sc.nft.entity.vo.AdminUserEcologyPointWalletPageVO;
import com.sc.nft.entity.vo.ecology.EcologyPointWalletExpendPageVO;
import com.sc.nft.entity.vo.ecology.EcologyPointWalletPageVO;
import com.sc.nft.enums.DaoEcologyPointsWalletLogTypeEnum;
import com.sc.nft.enums.EcologyIncomeTypeEnum;
import com.sc.nft.enums.EcologyPointsWalletEnum;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;

/**
 * <p>
 * 用户生态积分钱包 服务类
 * </p>
 *
 * @author liGen
 * @since 2024-11-26
 */
public interface UserEcologyPointsWalletService {


    UserEcologyPointsWallet getOneByUserIdAndPointId(Long pointsId, Long userId);

    boolean adjustAmount(Long userId, Long pointId,String pointName ,BigDecimal sumCount, EcologyPointsWalletEnum ecologyPointsWalletEnum, String remark);

    /**
     * 用户积分列表根据daoid条件查询
     * @param pageNo
     * @param pageSize
     * @param userCreatorId
     * @param userId
     * @return
     */
    IPage<EcologyPointWalletPageVO> userPage(Integer pageNo, Integer pageSize, Long userCreatorId,Long userId);

    /**
     * 用户钱包支出记录
     * @param pageNo
     * @param pageSize
     * @param userPointsWalletId
     * @param userId
     * @return
     */
    IPage<EcologyPointWalletExpendPageVO> userEcologyPointsExpend(Integer pageNo, Integer pageSize, Long userPointsWalletId, Long userId);

    /**
     * 编辑用户生态燃料
     * @param id
     * @param ecologyPointsWalletEnum
     * @param amountString
     * @param remark
     */
    void editUserPoints(Long id, Long userId,  String pointsName, EcologyPointsWalletEnum ecologyPointsWalletEnum,String amountString, String remark);

    /**
     * 分页获取用户燃料列表
     * @param userTel
     * @param pageNo
     * @param pageSize
     * @return
     */
    Page<AdminEcologyPointsUserWalletPageVO> getUserPage(String userTel, Integer pageNo, Integer pageSize);

    IPage<AdminUserEcologyPointWalletPageVO> adminUserPointWalletPage(Integer pageNo, Integer pageSize, Long userId);

    IPage<AdminDaoEcologyPointWalletPageVO> adminDaoPointWalletPage(Integer pageNo, Integer pageSize, Long userCreatorId);

    UserEcologyPointsWallet getOneByUserId(Long userId);

    Boolean addUserEcologyPointsWallet(Long userId, BigDecimal amount, EcologyPointsWalletEnum type,  String remark);
}
